package year2022.month456789;

import cn.hutool.core.date.LocalDateTimeUtil;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;

public class MainTest {

    public static void main(String[] args){
        double d = 0.58;
        int i = (int)(d*100);
        int a = BigDecimal.valueOf(d).multiply(BigDecimal.valueOf(100)).intValue();
        System.out.println(d);
        System.out.println(i);
        System.out.println(a);

        int lastMonthValue = LocalDateTimeUtil.offset(LocalDateTime.now(), -1, ChronoUnit.MONTHS).getMonthValue();
        System.out.println(lastMonthValue);

        String str = String.format("散列码：%h", "123456");
        System.out.println(str);

        str = String.format("暂只处理支付成功的支付单，payStatus=%s", new Integer(100));
        System.out.println(str);

        List<Integer> meterList = new ArrayList<>();
        meterList.add(1);
        meterList.add(2);
        System.out.println(String.format("要删除的网关[%s]，还绑定着%s个设备，请解除绑定后再删除", "666", meterList.size()));
    }

}
